#pragma once

#include "Transform.h"
/**
* This transform encapsulates a Quaternion rotation
* about a pivot point.
* This transformation has 3 parts :
* 1) translation to minus the pivot point
* 2) rotation.
* 3) translation back to the pivot point
*/
class AnimationTransform: public Transform
{
public:
	/**
	* Creates a new AnimationTransform object
	*/ 
	AnimationTransform(void);
	/**
	* Destroys the AnimationTransform object.
	*/
	virtual ~AnimationTransform(void);
	/**
	* Sets the transformation.
	* @param pivot the pivot point for the rotation.
	* @param quaternion the rotation 
	*/
	void SetTransformation(DAEFloat3 pivot, DAEFloat4 quaternion)
	{
		m_Pivot = pivot;
		m_Q= quaternion;
		SetChanged(true);
	}

	void ResetTransformParameters(){
	}

	/**
	* Recalculates the matrix.
	*/
	void RecalculateMatrix()const;
private:
	DAEFloat3 m_Pivot;
	DAEFloat4 m_Q;

	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	AnimationTransform(const AnimationTransform& t);
	AnimationTransform& operator=(const AnimationTransform& t);
};
